<template>
  <div id="salvenote">
    <div>
      <span class="title-item">运维成果反馈</span>
    </div>
    <div style="margin-bottom: 12px">
      <a-form-model layout="inline" :colon="false" :model="page">
        <a-form-model-item label="完成情况" labelAlign="right">
          <a-select @change="selectArea" class="selectwidth" allowClear placeholder="完成情况">
            <a-select-option value="1"> 未开始 </a-select-option>
            <a-select-option value="2"> 进行中 </a-select-option>
            <a-select-option value="3"> 已完成 </a-select-option>
            <a-select-option value="4"> 未完成 </a-select-option>
          </a-select>
        </a-form-model-item>
        <a-form-model-item label="任务类型" labelAlign="right">
          <a-select v-model="page.maintenanceType" placeholder="任务类型" class="selectwidth" allowClear>
            <a-select-option value="3"> 校验 </a-select-option>
            <a-select-option value="2"> 校准 </a-select-option>
            <a-select-option value="1"> 巡检 </a-select-option>
          </a-select>
        </a-form-model-item>
        <a-form-model-item label="排口查询">
          <a-input v-model="page.equipmentName" placeholder="请输入排口" allow-clear class="inputwidth"></a-input>
        </a-form-model-item>
        <a-form-model-item label="公司名称">
          <a-input v-model="page.companyName" placeholder="请输入公司名称" allow-clear class="inputwidth"></a-input>
        </a-form-model-item>
        <a-form-model-item label="时间段">
          <a-range-picker @change="pickerOnChange" class="pickerwidth"/>
        </a-form-model-item>
        <a-form-model-item>
          <a-button type="primary" @click="onSubmit">查询</a-button>
        </a-form-model-item>
      </a-form-model>
    </div>


    <div class="tableclass">
      <my-table style="min-height: 94%" :data-source="data" :pagination="false" :columns="columns">
        <span slot="action" slot-scope="text, action">
          <a class="solvebtn" @click="exhibition(action)" v-if="action.status == 3">台账明细</a>
          <a class="solvebtn" @click="exhibitian(action)" v-else>台账明细</a>
          <!-- <a-popconfirm
            title="审核是否通过"
            ok-text="通过"
            cancel-text="不通过"
            v-if="action.status == 3 && action.maintenanceType == 1"
            @confirm="yesconfirm(action, 1)"
            @cancel="yesconfirm(action, 2)"
          >
            <a class="solvebtn">审核</a>
          </a-popconfirm> -->
        </span>
        <template slot="status" slot-scope="status">
          <span style="color: #d16655" v-if="status == 1">未开始</span>
          <span style="color: #afa82e" v-if="status == 2">进行中</span>
          <span style="color: #359842" v-if="status == 3">已完成</span>
          <span style="color: #359842" v-if="status == 4">未完成</span>
        </template>
        <template slot="comparatorStatus" slot-scope="text, comparatorStatus">
          <span v-if="comparatorStatus.maintenanceType == 1">巡检</span>
          <span v-else-if="comparatorStatus.maintenanceType == 2">校准</span>
          <span v-else-if="comparatorStatus.maintenanceType == 3">校验</span>
        </template>
      </my-table>
      <div class="bottompage">
        <a-pagination :show-total="(total) => `共 ${total} 条记录`" :item-render="itemRender" v-model="page.current" :total="total" :defaultPageSize="page.size" @change="pagechangeFn" show-less-items/>
      </div>
      <!-- 详情弹出框 -->
      <!-- <a-modal
        title="分派详情"
        :visible="visible"
        @cancel="handleCancel"
        :footer="null"
      >
        <a-form-model
          class="monitorCalibrationRecordPoover"
          :form="list"
          :label-col="{ span: 5 }"
          :wrapper-col="{ span: 12 }"
        >
          <a-form-model-item label="任务名称">{{
            this.detail.name
          }}</a-form-model-item>
          <a-form-model-item label="计划开始时间">{{
            this.detail.planStartTime
          }}</a-form-model-item>
          <a-form-model-item label="计划结束时间">{{
            this.detail.planEndTime
          }}</a-form-model-item>
          <a-form-model-item label="任务区域">{{
            this.detail.taskArea
          }}</a-form-model-item>
        </a-form-model>
      </a-modal> -->
      <!-- 展示表格 -->
      <a-modal :visible="visibleA" @cancel="handleCancelA" :footer="null" width="98%">
        <a-col :span="2"> </a-col>
        <a-col :sapn="22" v-if="visibleA">
          <template v-if="overall.waterverification">
            <a-tabs type="card" class="tableall">
              <a-tab-pane tab="CEMS零点/量程漂移与校准记录" :key="1">
                <div class="table-all">
                  <a-row :span="24" class="shuju">
                    <div @click="Ycalibration" style="width: 100px; margin-left: 90%; cursor: pointer">
                      <a-icon type="cloud-download" style="color: #fff" />导出数据
                    </div>
                  </a-row>
                  <a-row>
                    <a-col :span="24" class="bordertop">CEMS零点/量程漂移与校准记录</a-col>
                    <a-col :span="4" class="borderalltwo">气态污染物CEMS设备生产商</a-col>
                    <a-col :span="4" class="borderallthree"> </a-col>
                    <a-col :span="4" class="borderallthree">气态污染物CEMS设备规格型号</a-col>
                    <a-col :span="4" class="borderallthree"> </a-col>
                    <a-col :span="4" class="borderallthree">校准日期</a-col>
                    <a-col :span="4" class="borderallthree">{{ calobrationone.calibrationTime }}</a-col>
                    <a-col :span="4" class="borderalltwo">颗粒物CEMS设备生产商</a-col>
                    <a-col :span="4" class="borderallthree"> </a-col>
                    <a-col :span="4" class="borderallthree">颗粒物CEMS设备规格型号</a-col>
                    <a-col :span="4" class="borderallthree"> </a-col>
                    <a-col :span="4" class="borderallthree">校准开始时间</a-col>
                    <a-col :span="4" class="borderallthree">{{ calobrationone.calibrationTime }}</a-col>
                    <a-col :span="6" class="borderall">安装地点</a-col>
                    <a-col :span="6" class="borderallone">{{ alldata.taskEquipmentInfoPoList.monitorName }}</a-col>
                    <a-col :span="6" class="borderallone">维护管理单位</a-col>
                    <a-col :span="6" class="borderallone">南京杰思尔环保智能科技有限公司</a-col>
                    <a-col :span="24" v-for="(all, a) in calobration" :key="a">
                      <a-col :span="12" class="borderall">分析仪校准</a-col>
                      <a-col :span="12" class="borderallone">{{all.enterpriseName}}</a-col>
                      <a-row v-for="(item, index) in all.overall" :key="index">
                        <a-col :span="6" class="borderalltwo">{{item.superiorField }}</a-col>
                        <template v-for="(list, i) in item.overall">
                          <a-col v-if="index == 0" :span="6" :key="i">
                            <a-col :span="12" class="borderallthree">{{list.field }}</a-col>
                            <a-col :span="12" class="borderallthree">{{list.situation }}</a-col>
                          </a-col>
                          <a-col :span="3" class="borderallone" v-else :key="i">
                            {{ list.field }}
                            <a-col class="borderallone">{{list.situation }}</a-col>
                          </a-col>
                        </template>
                      </a-row>
                    </a-col>
                    <a-col :span="4" class="borderall">本次校准人</a-col>
                    <a-col :span="4" class="borderallone">{{calobrationone.personCharge }}</a-col>
                    <a-col :span="4" class="borderallone">校准结束时间</a-col>
                    <a-col :span="4" class="borderallone">{{calobrationone.calibrationTimeEnd }}</a-col>
                    <a-col :span="4" class="borderallone">负责人（签章）</a-col>
                    <a-col :span="4" class="borderallone"></a-col>
                  </a-row>
                  <a-col class="border-img" v-if="calobrationone.pictureAssociation.length > 0">
                    <a-col :span="4" class="border-img1">校准过程</a-col>
                    <a-col :span="20" v-viewer>
                      <img :src="img.picId" alt="" v-for="(img, imgIndex) in calobrationone.pictureAssociation" :key="imgIndex" class="img"/>
                    </a-col>
                  </a-col>
                  <a-col class="border-img" v-if="calobrationone.pictureAssociationOne.length > 0">
                    <a-col :span="4" class="border-img1">校准记录</a-col>
                    <a-col :span="20" v-viewer>
                      <img :src="img.picId" alt="" v-for="(img, imgIndex) in calobrationone.pictureAssociationOne" :key="imgIndex" class="img"/>
                    </a-col>
                  </a-col>
                </div>
              </a-tab-pane>
              <a-tab-pane tab="签到详情" :key="2">
                <a-row :span="24">
                  <div class="shuju"></div>
                </a-row>
                <a-row>
                  <a-col :span="2" class="borderalltwo">任务编号</a-col>
                  <a-col :span="4" class="borderallthree">{{ alldata.name }}</a-col>
                  <a-col :span="2" class="borderallthree">管理人员</a-col>
                  <a-col :span="4" class="borderallthree">{{ calobrationone.personCharge }}</a-col>
                  <a-col :span="2" class="borderallthree">公司名称</a-col>
                  <a-col :span="4" class="borderallthree">{{ alldata.taskEquipmentInfoPoList.companyName }}</a-col>
                  <a-col :span="2" class="borderallthree">排口名称</a-col>
                  <a-col :span="4" class="borderallthree">{{ alldata.taskEquipmentInfoPoList.monitorName }}</a-col>
                  <a-col :span="2" class="borderalltwo">计划开始时间</a-col>
                  <a-col :span="4" class="borderallthree">{{moment(parseInt(alldata.planStartTime)).format("YYYY/MM/DD HH:mm:ss")}}</a-col>
                  <a-col :span="2" class="borderallthree">计划结束时间</a-col>
                  <a-col :span="4" class="borderallthree">{{moment(parseInt(alldata.planEndTime)).format("YYYY/MM/DD HH:mm:ss")}}</a-col>
                  <a-col :span="2" class="borderallthree">实际开始时间</a-col>
                  <a-col :span="4" class="borderallthree">{{moment(parseInt(alldata.actualStartTime)).format("YYYY/MM/DD HH:mm:ss")}}</a-col>
                  <a-col :span="2" class="borderallthree">实际结束时间</a-col>
                  <a-col :span="4" class="borderallthree">{{moment(parseInt(alldata.actualEndTime)).format("YYYY/MM/DD HH:mm:ss")}}</a-col>
                </a-row>
                <a-col class="border-img">
                  <a-col :span="4" class="border-img1">开始签到</a-col>
                  <a-col :span="20" v-viewer>
                    <img :src="img.picId" alt="" v-for="(img, imgIndex) in alldata.pictureAssociation" :key="imgIndex" class="img"/>
                  </a-col>
                </a-col>
                <a-col class="border-img" v-if="alldata.pictureAssociationOne.length > 0">
                  <a-col :span="4" class="border-img1">结束签到</a-col>
                  <a-col :span="20" v-viewer>
                    <img :src="img.picId" alt="" v-for="(img, imgIndex) in alldata.pictureAssociationOne" :key="imgIndex" class="img"/>
                  </a-col>
                </a-col>
              </a-tab-pane>
              </a-tab-pane>
            </a-tabs>
          </template>
          <template v-if="overall.watercailbration && all == 1">
            <a-tabs type="card" class="tableall">
              <a-tab-pane tab="烟气自动监测设备日常巡检记录" :key="1">
                <div class="table-all">
                  <a-row :span="24" class="shuju">
                    <div @click="YInspection" style="width: 100px; margin-left: 90%; cursor: pointer">
                      <a-icon type="cloud-download" style="color: #fff" />导出数据</div>
                  </a-row>
                  <a-row>
                    <a-col :span="24" class="bordertop">烟气自动监测设备日常巡检记录</a-col>
                    <a-col :span="6" class="borderall">气态污染物CEMS生产商</a-col>
                    <a-col :span="6" class="borderallone"> </a-col>
                    <a-col :span="6" class="borderallone">气态污染物CEMS规格型号</a-col>
                    <a-col :span="6" class="borderallone"> </a-col>
                    <a-col :span="6" class="borderall">颗粒物CEMS生产商</a-col>
                    <a-col :span="6" class="borderallone"> </a-col>
                    <a-col :span="6" class="borderallone">颗粒物CEMS规格型号</a-col>
                    <a-col :span="6" class="borderallone"> </a-col>
                    <a-col :span="6" class="borderall">安装地点</a-col>
                    <a-col :span="6" class="borderallone">{{ alldata.taskEquipmentInfoPoList.monitorName }}</a-col>
                    <a-col :span="6" class="borderallone">维护单位</a-col>
                    <a-col :span="6" class="borderallone">南京杰思尔环保智能科技有限公司</a-col>
                    <a-col :span="24" class="borderall">运行维护内容及处理说明</a-col>
                    <a-col :span="5" class="borderall">项目</a-col>
                    <a-col :span="19">
                      <a-col :span="10" class="borderallone">内容</a-col>
                      <a-col :span="10" class="borderallone">维护情况</a-col>
                      <a-col :span="4" class="borderallone">备注</a-col>
                    </a-col>
                    <a-col :span="24" v-if="all == 1">
                      <a-row style="display: flex">
                        <a-col :span="24">
                          <a-row style="display: flex" v-for="(item, index) in calobrationa" :key="index">
                            <a-col :span="5" class="border-class">{{item.name }}</a-col>
                            <a-col :span="19">
                              <a-row v-if="item.overall.length == 0" style="height: 100%; display: flex">
                                <a-col :span="12" class="border-1" style="height: auto"></a-col>
                                <a-col :span="12" class="border-1" style="height: auto"></a-col>
                              </a-row>
                              <a-row v-for="(_item, _index) in item.overall" :key="_index">
                                <a-col :span="10" class="borderallone">{{_item.name}}</a-col>
                                <!-- <a-col :span="10" class="borderallone">{{
                                _item.situation ? _item.situation : ""
                              }}</a-col> -->
                                <a-col :span="10" class="borderallone" v-if="_item.situation == 1">-</a-col>
                                <a-col :span="10" class="borderallone" v-if="_item.situation == 2">√</a-col>
                                <a-col :span="10" class="borderallone" v-if="_item.situation == 3">×</a-col>
                                <a-col :span="10" class="borderallone" v-if="_item.situation == 4">/</a-col>
                                <a-col :span="4" class="borderallone"></a-col>
                              </a-row>
                            </a-col>
                          </a-row>
                        </a-col>
                      </a-row>
                    </a-col>
                    <a-col :span="3" class="borderalltwo">异常情况处理记录</a-col>
                    <a-col :span="21" class="borderallthree">{{Inspectio.exceptionHandlingRecord}}</a-col>
                    <a-col :span="3" class="borderall">本次巡检人</a-col>
                    <a-col :span="5" class="borderallone">{{Inspectio.maintenanceStaff}}</a-col>
                    <a-col :span="4" class="borderallone"> 本次巡检时间</a-col>
                    <a-col :span="4" class="borderallone">{{Inspectio.serviceTime }}</a-col>
                    <a-col :span="4" class="borderallone">负责人</a-col>
                    <a-col :span="4" class="borderallone"></a-col>
                  </a-row>
                  <a-col class="border-img" v-if="Inspectio.pictureAssociation.length > 0">
                    <a-col :span="4" class="border-img1">巡检记录</a-col>
                    <a-col :span="20" v-viewer>
                      <img :src="img.picId" alt="" v-for="(img, imgIndex) in Inspectio.pictureAssociation" :key="imgIndex" class="img"/>
                    </a-col>
                  </a-col>
                </div>
              </a-tab-pane>
              <a-tab-pane tab="签到详情" :key="2">
                <a-row :span="24">
                  <div class="shuju"></div>
                </a-row>
                <a-row>
                  <a-col :span="2" class="borderalltwo">任务编号</a-col>
                  <a-col :span="4" class="borderallthree">{{ alldata.name }}</a-col>
                  <a-col :span="2" class="borderallthree">管理人员</a-col>
                  <a-col :span="4" class="borderallthree">{{ Inspectio.maintenanceStaff }}</a-col>
                  <a-col :span="2" class="borderallthree">公司名称</a-col>
                  <a-col :span="4" class="borderallthree">{{ alldata.taskEquipmentInfoPoList.companyName }}</a-col>
                  <a-col :span="2" class="borderallthree">排口名称</a-col>
                  <a-col :span="4" class="borderallthree">{{ alldata.taskEquipmentInfoPoList.monitorName }}</a-col>
                  <a-col :span="2" class="borderalltwo">计划开始时间</a-col>
                  <a-col :span="4" class="borderallthree">{{moment(parseInt(alldata.planStartTime)).format("YYYY/MM/DD HH:mm:ss")}}</a-col>
                  <a-col :span="2" class="borderallthree">计划结束时间</a-col>
                  <a-col :span="4" class="borderallthree">{{moment(parseInt(alldata.planEndTime)).format("YYYY/MM/DD HH:mm:ss")}}</a-col>
                  <a-col :span="2" class="borderallthree">实际开始时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.actualStartTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">实际结束时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.actualEndTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                </a-row>
                <a-col class="border-img">
                  <a-col :span="4" class="border-img1">开始签到</a-col>
                  <a-col :span="20" v-viewer>
                    <img
                      :src="img.picId"
                      alt=""
                      v-for="(img, imgIndex) in alldata.pictureAssociation"
                      :key="imgIndex"
                      class="img"
                    />
                  </a-col>
                </a-col>
                <a-col
                  class="border-img"
                  v-if="alldata.pictureAssociationOne.length > 0"
                >
                  <a-col :span="4" class="border-img1">结束签到</a-col>
                  <a-col :span="20" v-viewer>
                    <img
                      :src="img.picId"
                      alt=""
                      v-for="(img, imgIndex) in alldata.pictureAssociationOne"
                      :key="imgIndex"
                      class="img"
                    />
                  </a-col>
                </a-col>
              </a-tab-pane>
            </a-tabs>
          </template>
          <template v-if="overall.checklist">
            <a-tabs type="card" class="tableall">

              <a-tab-pane tab="水污染源自动监测仪校验记录" v-for="(data, dataindex) in monitorCalibrationRecordPo" :key="dataindex">
                <div class="table-all">
                  <a-row :span="24" class="shuju">
                    <div @click="Wcheck(data)" style="width: 100px; margin-left: 90%; cursor: pointer">
                      <a-icon type="cloud-download" style="color: #fff" />
                      导出数据
                    </div>
                  </a-row>
                  <a-row>
                    <a-col :span="24" class="bordertop">水污染源自动监测仪校验记录</a-col>
                    <a-col :span="4" class="borderall"> 站点名称 </a-col>
                    <a-col :span="4" class="borderallone">{{ alldata.taskEquipmentInfoPoList.monitorName }}</a-col>
                    <a-col :span="4" class="borderallone">仪器类别 </a-col>
                    <a-col :span="4" class="borderallone"> </a-col>
                    <a-col :span="4" class="borderallone"> 型号</a-col>
                    <a-col :span="4" class="borderallone"> </a-col>
                    <a-col :span="4" class="borderall"> 月次 </a-col>
                    <a-col :span="4" class="borderallone">{{ data.monthly }}</a-col>
                    <a-col :span="4" class="borderallone">日期 </a-col>
                    <a-col :span="4" class="borderallone">{{ data.date }}</a-col>
                    <a-col :span="4" class="borderallone"> 时间</a-col>
                    <a-col :span="4" class="borderallone">{{moment(parseInt(data.time)).format("YYYY/MM/DD") }}</a-col
                    >
                    <a-col :span="4" class="borderall"> 校验项 </a-col>
                    <a-col :span="20" class="borderallone">{{ data.corporateName }}</a-col>
                    <a-col :span="4" class="borderallseven">校验</a-col>
                    <a-col :span="5">
                      <a-row class="borderallone">第一次</a-row>
                      <a-row class="borderallone">标准值</a-row>
                      <a-row class="borderallone">仪器值</a-row>
                      <a-row class="borderallone">误差</a-row>
                      <a-row class="borderallone">结论</a-row>
                    </a-col>
                    <a-col :span="15" class="borderallq" v-if="data.length == 0"></a-col>
                    <template v-for="(list, index) in data.overall">
                      <a-col :span="3" v-if="index < 5">
                        <a-row class="borderallone">{{list.monitoringType }}</a-row>
                        <a-row class="borderallone">{{list.standardValue }}</a-row>
                        <a-row class="borderallone">{{list.instrumentValue }}</a-row>
                        <a-row class="borderallone">{{ list.error }}</a-row>
                        <a-row class="borderallone">{{list.conclusion }}</a-row>
                      </a-col>
                    </template>
                    <template v-if="data.overall.length<=5">
                      <template v-for="(list, index) in (5 - data.overall.length)">
                        <a-col :span="3" v-if="index < 5">
                          <a-row class="borderallone">{{list.monitoringType }}</a-row>
                          <a-row class="borderallone">{{list.standardValue }}</a-row>
                          <a-row class="borderallone">{{list.instrumentValue }}</a-row>
                          <a-row class="borderallone">{{ list.error }}</a-row>
                          <a-row class="borderallone">{{list.conclusion }}</a-row>
                        </a-col>
                      </template>
                    </template>

                    <a-col :span="5" class="borderalleight">线性变动过程记录:</a-col>
                    <a-col :span="15" class="borderalleight">{{ data.linearChangeRecord }}</a-col>

                    <a-col :span="5">
                      <a-row class="borderallone">第二次</a-row>
                      <a-row class="borderallone">标准值</a-row>
                      <a-row class="borderallone">仪器值</a-row>
                      <a-row class="borderallone">误差</a-row>
                      <a-row class="borderallone">结论</a-row>
                    </a-col>
                    <a-col :span="15" class="borderallq" v-if="data.length == 0"></a-col>
                    <template v-for="(list, index) in data.overall">
                      <a-col :span="3" v-if="index > 4">
                        <a-row class="borderallone">{{list.monitoringType }}</a-row>
                        <a-row class="borderallone">{{list.standardValue }}</a-row>
                        <a-row class="borderallone">{{list.instrumentValue}}</a-row>
                        <a-row class="borderallone">{{ list.error }}</a-row>
                        <a-row class="borderallone">{{list.conclusion}}</a-row>
                      </a-col>
                    </template>
                    <a-col :span="5" class="borderallnine">实施人:</a-col>
                    <a-col :span="15" class="borderallnine">{{ data.implementer }}</a-col>
                    <a-col :span="4" class="borderalltwo">领导审批</a-col>
                    <a-col :span="20" class="borderallthree"></a-col>
                  </a-row>
                  <a-col class="border-img" v-if="data.pictureAssociation">
                    <a-col :span="4" class="border-img1">校验过程</a-col>
                    <a-col :span="20" v-viewer>
                      <img :src="img.picId" alt="" v-for="(img, imgIndex) in data.pictureAssociation" :key="imgIndex" class="img"/>
                    </a-col>
                  </a-col>
                  <a-col class="border-img" v-if="data.pictureAssociationOne">
                    <a-col :span="4" class="border-img1">校验记录</a-col>
                    <a-col :span="20" v-viewer>
                      <img :src="img.picId" alt="" v-for="(img, imgIndex) in data.pictureAssociationOne" :key="imgIndex" class="img"/>
                    </a-col>
                  </a-col>
                </div>
              </a-tab-pane>




              <a-tab-pane tab="签到详情">
                <a-row :span="24">
                  <div class="shuju"></div>
                </a-row>
                <a-row>
                  <a-col :span="2" class="borderalltwo">任务编号</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{ alldata.name }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">管理人员</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{ monitorCalibrationRecordPo[0].implementer }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">公司名称</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{ alldata.taskEquipmentInfoPoList.companyName }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">排口名称</a-col>
                  <a-col :span="4" class="borderallthree"
                    >{{ alldata.taskEquipmentInfoPoList.monitorName }}
                  </a-col>
                  <a-col :span="2" class="borderalltwo">计划开始时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.planStartTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">计划结束时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.planEndTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">实际开始时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.actualStartTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">实际结束时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.actualEndTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                </a-row>
                <a-col class="border-img">
                  <a-col :span="4" class="border-img1">开始签到</a-col>
                  <a-col :span="20" v-viewer>
                    <img
                      :src="img.picId"
                      alt=""
                      v-for="(img, imgIndex) in alldata.pictureAssociation"
                      :key="imgIndex"
                      class="img"
                    />
                  </a-col>
                </a-col>
                <a-col
                  class="border-img"
                  v-if="alldata.pictureAssociationOne.length > 0"
                >
                  <a-col :span="4" class="border-img1">结束签到</a-col>
                  <a-col :span="20" v-viewer>
                    <img
                      :src="img.picId"
                      alt=""
                      v-for="(img, imgIndex) in alldata.pictureAssociationOne"
                      :key="imgIndex"
                      class="img"
                    />
                  </a-col>
                </a-col>
              </a-tab-pane>
            </a-tabs>
          </template>
          <template v-if="overall.smokerepair">
            <a-tabs type="card" class="tableall">
              <a-tab-pane tab="水污染源自动监测仪校准记录" :key="1">
                <div class="table-all">
                  <a-row :span="24" class="shuju">
                    <div @click="Wcalibration" style="width: 100px; margin-left: 90%; cursor: pointer">
                      <a-icon type="cloud-download" style="color: #fff" />导出数据
                    </div>
                  </a-row>
                  <a-row>
                    <a-col :span="24" class="bordertop"
                      >水污染源自动监测仪校准记录</a-col
                    >
                    <a-col :span="4" class="borderall"> 站点名称 </a-col>
                    <a-col :span="4" class="borderallone">{{
                      alldata.taskEquipmentInfoPoList.monitorName
                    }}</a-col>
                    <a-col :span="4" class="borderallone"> 仪器类别 </a-col>
                    <a-col :span="4" class="borderallone">水污染 </a-col>
                    <a-col :span="4" class="borderallone"> 型号 </a-col>
                    <a-col :span="4" class="borderallone"> </a-col>
                    <a-col :span="4" class="borderall"> 月份 </a-col>
                    <a-col :span="4" class="borderallone"> {{ yue }}</a-col>
                    <a-col :span="4" class="borderallone"> 日期 </a-col>
                    <a-col :span="4" class="borderallone"> {{ ri }}</a-col>
                    <a-col :span="4" class="borderallone"> 时间 </a-col>
                    <a-col :span="4" class="borderallone">
                      {{ watercailbration.calibrationTime }}</a-col
                    >

                    <a-col :span="24">
                      <a-row>
                        <a-col :span="3" class="borderall">常规项</a-col>
                        <a-col :span="21">
                          <a-col :span="4" class="borderallone"
                            >校准前各参数</a-col
                          >
                          <a-col :span="4" class="borderallone">是否正常</a-col>
                          <a-col :span="4" class="borderallone">异常参数</a-col>
                          <a-col :span="4" class="borderallone"
                            >校准后各参数</a-col
                          >
                          <a-col :span="4" class="borderallone">是否正常</a-col>
                          <a-col :span="4" class="borderallone">异常参数</a-col>
                        </a-col>
                      </a-row>
                      <a-row v-for="(item, index) in water" :key="index">
                        <a-col :span="3" class="borderall">{{
                          index + 1
                        }}</a-col>
                        <a-col :span="21">
                          <a-col
                            :span="4"
                            v-for="(_item, _index) in item.overall[0].overall"
                            :key="_index"
                            class="borderallone"
                          >
                            {{ _item.situation }}
                          </a-col>
                        </a-col>
                      </a-row>
                    </a-col>
                    <a-col :span="4" class="borderallseven">结果记录</a-col>
                    <a-col :span="4" class="borderallbig">异常情况描述</a-col>
                    <a-col :span="16" class="borderallbig">{{
                      watercailbration.abnormalSituation
                    }}</a-col>
                    <a-col :span="4" class="borderallbig"
                      >原因分析与采取措施</a-col
                    >
                    <a-col :span="16" class="borderallbig">{{
                      watercailbration.causeAnalysis
                    }}</a-col>
                    <a-col :span="4" class="borderallbig"
                      >处理结果及器件更换</a-col
                    >
                    <a-col :span="16" class="borderallbig">{{
                      watercailbration.processingResults
                    }}</a-col>
                    <a-col :span="4" class="borderallbig"
                      >线形变动校验前记录</a-col
                    >
                    <a-col :span="16" class="borderallbig">{{
                      watercailbration.linearChangeFront
                    }}</a-col>
                    <a-col :span="4" class="borderallbig"
                      >线形变动校验后记录</a-col
                    >
                    <a-col :span="16" class="borderallbig">{{
                      watercailbration.linearChangeAfter
                    }}</a-col>
                    <a-col :span="4" class="borderalltwo">领导审批</a-col>
                    <a-col :span="20" class="borderallthree"></a-col>
                  </a-row>
                  <a-col
                    class="border-img"
                    v-if="watercailbration.pictureAssociation.length > 0"
                  >
                    <a-col :span="4" class="border-img1">校准过程</a-col>
                    <a-col :span="20" v-viewer>
                      <img
                        :src="img.picId"
                        alt=""
                        v-for="(
                          img, imgIndex
                        ) in watercailbration.pictureAssociation"
                        :key="imgIndex"
                        class="img"
                      />
                    </a-col>
                  </a-col>
                  <a-col
                    class="border-img"
                    v-if="watercailbration.pictureAssociationOne.length > 0"
                  >
                    <a-col :span="4" class="border-img1">校准记录</a-col>
                    <a-col :span="20" v-viewer>
                      <img
                        :src="img.picId"
                        alt=""
                        v-for="(
                          img, imgIndex
                        ) in watercailbration.pictureAssociationOne"
                        :key="imgIndex"
                        class="img"
                      />
                    </a-col>
                  </a-col>
                </div>
              </a-tab-pane>
              <a-tab-pane tab="签到详情" :key="2">
                <a-row :span="24"><div class="shuju"></div></a-row>
                <a-row>
                  <a-col :span="2" class="borderalltwo">任务编号</a-col>
                  <a-col :span="4" class="borderallthree">{{ alldata.name }}</a-col>
                  <a-col :span="2" class="borderallthree">管理人员</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{ watercailbration.implementer }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">公司名称</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{ alldata.taskEquipmentInfoPoList.companyName }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">排口名称</a-col>
                  <a-col :span="4" class="borderallthree"
                    >{{ alldata.taskEquipmentInfoPoList.monitorName }}
                  </a-col>
                  <a-col :span="2" class="borderalltwo">计划开始时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.planStartTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">计划结束时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.planEndTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">实际开始时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.actualStartTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">实际结束时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.actualEndTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                </a-row>
                <a-col class="border-img">
                  <a-col :span="4" class="border-img1">开始签到</a-col>
                  <a-col :span="20" v-viewer>
                    <img
                      :src="img.picId"
                      alt=""
                      v-for="(img, imgIndex) in alldata.pictureAssociation"
                      :key="imgIndex"
                      class="img"
                    />
                  </a-col>
                </a-col>
                <a-col
                  class="border-img"
                  v-if="alldata.pictureAssociationOne.length > 0"
                >
                  <a-col :span="4" class="border-img1">结束签到</a-col>
                  <a-col :span="20" v-viewer>
                    <img
                      :src="img.picId"
                      alt=""
                      v-for="(img, imgIndex) in alldata.pictureAssociationOne"
                      :key="imgIndex"
                      class="img"
                    />
                  </a-col>
                </a-col>
              </a-tab-pane>
              <a-tab-pane tab="CEMS校验测试记录表" :key="3" v-if="false">
                  <a-row>
                    <a-col :span="24" class="enterpriseName">企业名称：</a-col>
                    <a-col :span="24" class="enterpriseName">CEMS供应商：</a-col>
                    <a-col :span="24" class="enterpriseName cent">CEMS主要仪器型号</a-col>
                    <a-col :span="24" style="display: flex;border-top: 1px solid #e8e8e8">
                      <div class="borderall col5 cent">仪器名称</div>
                      <div class="borderall col5 cent">设备型号</div>
                      <div class="borderall col5 cent">制造商</div>
                      <div class="borderall col5 cent">测试项目</div>
                      <div class="borderall col5 cent">测量原理</div>
                    </a-col>
                    <a-col :span="24" style="display: flex;" v-for="(v,i) in 2" :key="i">
                      <div class="borderall col5 cent"></div>
                      <div class="borderall col5 cent"></div>
                      <div class="borderall col5 cent"></div>
                      <div class="borderall col5 cent"></div>
                      <div class="borderall col5 cent"></div>
                    </a-col>
                    <a-col :span="24" style="display: flex;">
                      <div class="borderall col5 cent">CEMS安装地点</div>
                      <div class="borderall cent" style="flex: 1"></div>
                      <div class="borderall col5 cent">维护管理单位</div>
                      <div class="borderall cent" style="flex: 1"></div>
                    </a-col>
                    <a-col :span="24" style="display: flex;">
                      <div class="borderall col5 cent">本次校验日期</div>
                      <div class="borderall cent" style="flex: 1"></div>
                      <div class="borderall col5 cent">上次校验日期</div>
                      <div class="borderall cent" style="flex: 1"></div>
                    </a-col>
                    <template>
                      <a-row >
                        <a-col :span="24" class="bordertop" style="font-size: 14px">颗粒物校验</a-col>
                        <a-col :span="24" style="display: flex" class="s">
                          <a-col :span="4" class="borderall lien-cent cent">监测时间</a-col>
                          <a-col :span="5" class="borderall">
                            <div>参比方法测定值</div>
                            <div>（mg/m³）</div>
                          </a-col>
                          <a-col :span="5" class="borderall">
                            <div>CEMS测定值</div>
                            <div>（mg/m³）</div>
                          </a-col>
                          <a-col :span="4" class="borderall">
                            <div>相对误差</div>
                            <div>绝对误差</div>
                          </a-col>
                          <a-col :span="2" class="borderall lien-cent cent">评价标准</a-col>
                          <a-col :span="4" class="borderall lien-cent cent">评价结果</a-col>
                        </a-col>
                        <a-col :span="24" class="listitem">
                          <a-col :span="14" class="cent" style="flex-wrap: wrap">
                            <a-col :span="24" style="display: flex" v-for="(v,i) in 5" :key="i">
                              <div class="borderall" style="width: 28.7%">as</div>
                              <div class="borderall" style="width: 36%">a</div>
                              <div class="borderall" style="width: 36%">as</div>
                            </a-col>
                            <a-col :span="24" style="display: flex">
                              <div class="borderall" style="width: 28.7%">平均值</div>
                              <div class="borderall" style="width: 36%"></div>
                              <div class="borderall" style="width: 36%"></div>
                            </a-col>
                          </a-col>
                          <a-col :span="4" class="borderall cent">
                            asas
                          </a-col>
                          <a-col :span="2" class="borderall cent">
                            as
                          </a-col>
                          <a-col :span="4" class="borderall cent">
                            f
                          </a-col>
                        </a-col>
                      </a-row>
                    </template>
                  </a-row>

              </a-tab-pane>
            </a-tabs>
          </template>
          <template v-if="overall.calobration && all == 2">
            <a-tabs type="card" class="tableall">
              <a-tab-pane tab="水污染源自动监测设备运行维护日常巡检" :key="1">
                <div class="table-all">
                  <a-row :span="24" class="shuju">
                    <div
                      @click="WInspection"
                      style="width: 100px; margin-left: 90%; cursor: pointer"
                    >
                      <a-icon type="cloud-download" style="color: #fff" />
                      导出数据
                    </div>
                  </a-row>
                  <a-row>
                    <a-col :span="24" class="bordertop"
                      >水污染源自动监测设备运行维护日常巡检</a-col
                    >
                    <a-col :span="12" class="borderalltwo">
                      设备巡检内容、情况、及处理情况说明
                    </a-col>
                    <a-col :span="12" class="borderallone">设备名称</a-col>
                    <a-col :span="12" class="borderallone">{{
                      alldata.equipmentName
                    }}</a-col>

                    <a-col :span="24" v-if="all == 2">
                      <a-row style="display: flex">
                        <a-col
                          :span="3"
                          class="border-class"
                          style="writing-mode: vertical-rl"
                        >
                          日常维护记录
                        </a-col>
                        <a-col :span="21">
                          <a-row
                            style="display: flex"
                            v-for="(item, index) in calobrationa"
                            :key="index"
                          >
                            <a-col :span="6" class="border-class1">{{
                              item.name
                            }}</a-col>
                            <a-col :span="18">
                              <a-row
                                v-if="item.overall.length == 0"
                                style="height: 100%; display: flex"
                              >
                                <a-col
                                  :span="12"
                                  class="border-1"
                                  style="height: auto"
                                ></a-col>
                                <a-col
                                  :span="12"
                                  class="border-1"
                                  style="height: auto"
                                ></a-col>
                              </a-row>
                              <a-row
                                v-for="(_item, _index) in item.overall"
                                :key="_index"
                              >
                                <a-col :span="12" class="borderallone">{{
                                  _item.name
                                }}</a-col>
                                <a-col
                                  :span="12"
                                  class="borderallone"
                                  v-if="_item.situation == 1"
                                  >-</a-col
                                >
                                <a-col
                                  :span="12"
                                  class="borderallone"
                                  v-if="_item.situation == 2"
                                  >√</a-col
                                >
                                <a-col
                                  :span="12"
                                  class="borderallone"
                                  v-if="_item.situation == 3"
                                  >×</a-col
                                >
                                <a-col
                                  :span="12"
                                  class="borderallone"
                                  v-if="_item.situation == 4"
                                  >/</a-col
                                >
                              </a-row>
                            </a-col>
                          </a-row>
                        </a-col>
                      </a-row>
                    </a-col>

                    <a-col :span="3" class="borderalltwo">服务内容</a-col>
                    <a-col :span="18" class="borderallthree">{{
                      Inspectio.serviceContent
                    }}</a-col>
                    <a-col :span="3" class="borderallthree"></a-col>
                    <a-col :span="3" class="borderalltwo"
                      >异常情况处理记录</a-col
                    >
                    <a-col :span="18" class="borderallthree">{{
                      Inspectio.exceptionHandlingRecord
                    }}</a-col>
                    <a-col :span="3" class="borderallthree"></a-col>
                    <a-col :span="3" class="borderalltwo">服务时间</a-col>
                    <a-col :span="4" class="borderallthree">{{
                      Inspectio.serviceTime
                    }}</a-col>
                    <a-col :span="4" class="borderallthree">服务耗时</a-col>
                    <a-col :span="4" class="borderallthree">{{
                      Inspectio.consumptionTime
                    }}</a-col>
                    <a-col :span="4" class="borderallthree">维护人员</a-col>
                    <a-col :span="5" class="borderallthree">{{
                      Inspectio.maintenanceStaff
                    }}</a-col>
                    <a-col :span="3" class="borderalltwo">业主方代表</a-col>
                    <a-col :span="12" class="borderallthree"></a-col>
                    <a-col :span="4" class="borderallthree">日期</a-col>
                    <a-col :span="5" class="borderallthree"></a-col>
                  </a-row>
                  <a-col
                    class="border-img"
                    v-if="Inspectio.pictureAssociation.length > 0"
                  >
                    <a-col :span="4" class="border-img1">巡检记录</a-col>
                    <a-col :span="20" v-viewer>
                      <img
                        :src="img.picId"
                        alt=""
                        v-for="(img, imgIndex) in Inspectio.pictureAssociation"
                        :key="imgIndex"
                        class="img"
                      />
                    </a-col>
                  </a-col>
                </div>
              </a-tab-pane>
              <a-tab-pane tab="签到详情" :key="2">
                <a-row :span="24">
                  <div class="shuju"></div>
                </a-row>
                <a-row>
                  <a-col :span="2" class="borderalltwo">任务编号</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{ alldata.name }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">管理人员</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{ Inspectio.maintenanceStaff }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">公司名称</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{ alldata.taskEquipmentInfoPoList.companyName }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">排口名称</a-col>
                  <a-col :span="4" class="borderallthree"
                    >{{ alldata.taskEquipmentInfoPoList.monitorName }}
                  </a-col>
                  <a-col :span="2" class="borderalltwo">计划开始时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.planStartTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">计划结束时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.planEndTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">实际开始时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.actualStartTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                  <a-col :span="2" class="borderallthree">实际结束时间</a-col>
                  <a-col :span="4" class="borderallthree">
                    {{
                      moment(parseInt(alldata.actualEndTime)).format(
                        "YYYY/MM/DD HH:mm:ss"
                      )
                    }}</a-col
                  >
                </a-row>
                <a-col class="border-img">
                  <a-col :span="4" class="border-img1">开始签到</a-col>
                  <a-col :span="20" v-viewer>
                    <img
                      :src="img.picId"
                      alt=""
                      v-for="(img, imgIndex) in alldata.pictureAssociation"
                      :key="imgIndex"
                      class="img"
                    />
                  </a-col>
                </a-col>
                <a-col
                  class="border-img"
                  v-if="alldata.pictureAssociationOne.length > 0"
                >
                  <a-col :span="4" class="border-img1">结束签到</a-col>
                  <a-col :span="20" v-viewer>
                    <img
                      :src="img.picId"
                      alt=""
                      v-for="(img, imgIndex) in alldata.pictureAssociationOne"
                      :key="imgIndex"
                      class="img"
                    />
                  </a-col>
                </a-col>
              </a-tab-pane>
            </a-tabs>
          </template>

        </a-col>
      </a-modal>
    </div>
  </div>
</template>

<script>
import moment from "moment";
import "moment/locale/zh-cn";
import { log } from "video.js";
import "viewerjs/dist/viewer.css";
import Viewer from "v-viewer";
import Vue from "vue";
Vue.use(Viewer);

export default {
  data() {
    return {
      overall: {
        waterreplace: false,
        waterrepair: false,
        waterverification: false,
        watercailbration: false,
        calobrationa: false,
        listData: false,
        checklist: false,
        smokerepair: false,
        calobration: false,
      },
      yue: [],
      ri: [],
      Inspectio: [],
      tableType: 0,
      all: "",
      arrData: [],
      alldata: {},
      listDataone: [],
      checklist: [], //校验记录
      calobration: [], //烟气校准
      watercalobration: [], //水质校准
      calobrationone: [],
      waterreplaceone: [],
      waterverification: [], //水质校验
      waterdata: {},
      monitorCalibrationRecordPo: [],
      watercailbration: [], //水质校准
      water: [],
      waterx: [],
      calobrationa: [], //日程巡检
      columns: [
        {
          title: "序号",
          dataIndex: "num",
          align: "center",
          customRender: (text, record, index) =>
            `${(this.page.current - 1) * this.page.size + index + 1}`,
        },
        {
          title: "公司名称",
          dataIndex: "companyName",
          align: "center",
          ellipsis: true,
        },
        {
          title: "任务名称",
          dataIndex: "name",
          align: "center",
          ellipsis: true,
        },
        {
          title: "排口名称",
          dataIndex: "equipmentName",
          align: "center",
          ellipsis: true,
        },
        {
          title: "类型",
          dataIndex: "",
          scopedSlots: { customRender: "comparatorStatus" },
          align: "center",
        },
        {
          title: "分配人",
          dataIndex: "_nickname",
          align: "center",
          ellipsis: true,
        },
        {
          title: "执行人",
          dataIndex: "nickname",
          align: "center",
        },
        {
          title: "计划开始时间",
          dataIndex: "planStartTime",
          align: "center",
          width:150
        },
        {
          title: "计划结束时间",
          dataIndex: "planEndTime",
          align: "center",
          width:150
        },
        {
          title: "状态",
          dataIndex: "status",
          scopedSlots: { customRender: "status" },
          align: "center",
        },
        {
          title: "操作",
          dataIndex: "",
          key: "x",
          scopedSlots: { customRender: "action" },
          align: "center",
        },
      ],
      ischange: 0,
      tags: [],
      data: [],
      title: "",
      moment,
      page: {
        current: 1,
        size: 10,
        status: "",
        equipmentName: "",  //  排口名称
        companyName:"",  // 公司名称
        maintenanceType:undefined,
        planStartTime:"",
        planEndTime:"",
      },
      total: 0,
      //详情弹出框
      visible: false,
      visibleA: false,
      confirmLoading: false,
      //表格数据
      list: [],
      //详情数据
      detail: {
        type: 0,
      },
      shujuone: "",
      //修改数据
      addForm: {
        id: "",
        name: "",
        taskArea: "",
        note: "string //备注",
        status: 1,
        planStartTime: "",
        planEndTime: "",
      },
      checkData1: {},
      checkData2: {},
      checkData3: [],
      updateExaminePo: {
        id: "",
        ownerStart: "",
      },
    };
  },

  methods: {
    // yesconfirm(record, status) {
    //   this.updateExaminePo.id = record.id;
    //   this.updateExaminePo.ownerStart = status;
    //   this.$api.task_updateExaminePo(this.updateExaminePo).then((res) =>{
    //     console.log(res);
    //   })
    // },
    // 日期
    pickerOnChange(date, dateString){
      if(date.length>0){
        this.page.planStartTime = date[0].valueOf();
        this.page.planEndTime = date[1].valueOf();
      }else {
        this.page.planStartTime = "";
        this.page.planEndTime = "";
      }
    },

    onSubmit() {
      this.page.current = 1;
      this.getdata();
    },
    //烟气校准
    Ycalibration() {
      this.findOperationByPage();
      // console.log(this.calobration[0].id);
      if (this.calobration.length > 0) {
        this.id = this.calobrationone.id;
        this.$api.driftCalibration(this.id).then((res) => {
          if (res.data.data.indexOf("数据错误，请联系管理员！") >= 0) {
            this.$message.info("暂无数据");
          } else {
            window.open(res.data.data);
          }
        });
      } else {
        this.$message.info("暂无数据");
      }
    },
    //烟气巡检
    YInspection() {
      this.findOperationByPage();
      //  console.log(this.Inspectio);
      if (this.Inspectio != "") {
        this.id = this.Inspectio.id;
        // console.log(this.id);
        this.$api
          .findEquipmentOperationMaintenanceByPage(this.id)
          .then((res) => {
            if(res.data.code === 0){
              if (res.data.data.indexOf("数据错误，请联系管理员！") >= 0) {
                this.$message.info("暂无数据");
              } else {
                window.open(res.data.data);
              }
            }else {
              this.$message.warning(res.data.errorMessage)
            }

          });
      } else {
        this.$message.info("暂无数据");
      }
    },
    //水质校验
    Wcheck(data) {
      this.findOperationByPage();
      if (this.monitorCalibrationRecordPo != "") {
        this.id = data.id;
        this.$api.checkListBy(this.id).then((res) => {
          if (res.data.data.indexOf("数据错误，请联系管理员！") >= 0) {
            this.$message.info("暂无数据");
          } else {
            window.open(res.data.data);
          }
        });
      } else {
        this.$message.info("暂无数据");
      }
    },
    //水质校准
    Wcalibration() {
      this.findOperationByPage();
      // console.log( this.watercailbration );
      if (this.watercailbration != "") {
        this.id = this.watercailbration.id;
        //  console.log(this.id);
        this.$api.waterDriftCalibration(this.id).then((res) => {
          if (res.data.data.indexOf("数据错误，请联系管理员！") >= 0) {
            this.$message.info("暂无数据");
          } else {
            window.open(res.data.data);
          }
        });
      } else {
        this.$message.info("暂无数据");
      }
    },
    //水质巡检
    WInspection() {
      this.findOperationByPage();
      //  console.log(this.Inspectio);
      if (this.Inspectio != "") {
        this.id = this.Inspectio.id;
        // console.log(this.id);
        this.$api
          .findEquipmentOperationMaintenanceByPage(this.id)
          .then((res) => {
            if (res.data.data.indexOf("数据错误，请联系管理员！") >= 0) {
              this.$message.info("暂无数据");
            } else {
              window.open(res.data.data);
            }
          });
      } else {
        this.$message.info("暂无数据");
      }
    },
    //选择完成情况
    selectArea(value) {
      this.page.status = value;
    },
    selectAreA(value) {
      this.page.maintenanceType = value;
    },
    //分页方法
    itemRender(current, type, originalElement) {
      if (type === "prev") {
        return <a> 上一页 </a>;
      } else if (type === "next") {
        return <a> 下一页 </a>;
      }
      return originalElement;
    },
    pagechangeFn(page, pageSize) {
      this.page.current = page;
      this.getdata();
    },
    //弹出框方法,查看详情
    // showModal(data) {
    //   this.detail = data;
    //   this.visible = true;
    //   let id = data.id;
    // },
    //弹窗框，展示表格
    exhibition(data) {
      this.detail = data;
      this.tableType = data.taskEquipmentInfoPoList.monitorType;
      this.findOperationByPage();
    },
    exhibitian() {
      this.$message.info("暂无数据");
    },
    //关闭弹窗
    handleCancel(e) {
      console.log("点击关闭按钮");
      this.visible = false;
    },
    //关闭弹窗
    handleCancelA() {
      this.visibleA = false;
      this.listData = [];
      this.waterreplace = [];
      this.smokerepair = [];
      this.calobration = [];
      this.waterrepair = [];
      this.waterverification = [];
      this.waterDriftCalibrationPo = [];
    },
    //日期方法
    onChangeDate() {},
    //获取数据
    getdata(sid) {
      //
      var that = this;
      this.$api.task_findByPage(this.page).then((res) => {
        if (res.data.code == 0) {

          var result = res.data.data;
          if (!result) {
            result == [];
          }
          for (var i = 0; i < result.length; i++) {
            if (result[i].equipmentCount == null) {
              result[i].equipmentCount = "";
            }
            if (result[i].equipmentType == null) {
              result[i].equipmentType = "";
            }
          }
          this.data = res.data.data;
          this.data.forEach((item) => {
            this.shujuone = item;
            if (item.planStartTime === null) {
              item.planStartTime = "";
            } else {
              item.planStartTime = moment(parseInt(item.planStartTime)).format(
                "YYYY/MM/DD"
              );
            }
            if (this.planEndTime === null) {
              item.planEndTime = "";
            } else {
              item.planEndTime = moment(parseInt(item.planEndTime)).format(
                "YYYY/MM/DD"
              );
            }
            item._nickname = "";
            item.userInfoPoList.forEach((nickname) => {
              item._nickname += nickname.nickname + ",";
            });
            item._nickname = item._nickname.substring(
              0,
              item._nickname.length - 1
            );
          });
          that.data = result;
          this.total = res.data.total;
        }
      });
    },

    //表格数据
    findOperationByPage() {
      this.$api.Api_findOperationByPage(this.detail.id).then((res) => {

        this.alldata = res.data.data;
        this.overall = {
          waterverification:this.alldata.driftCalibrationPo.length == 0 ? false : true,
          watercailbration:this.alldata.equipmentOperationMaintenancePo.length == 0? false:true,
          checklist:this.alldata.monitorCalibrationRecordPo.length == 0 ? false : true,
          smokerepair:this.alldata.waterDriftCalibrationPo.length == 0 ? false : true,
          calobration:this.alldata.equipmentOperationMaintenancePo.length == 0? false: true,
        };
        console.log(this.overall)
        if (res.data.data.status == 3 || res.data.data.status == 2) {
          this.all = res.data.data.taskEquipmentInfoPoList.monitorType;
          var arrData = res.data.data;
          let equipmentId = arrData.equipmentId;
          if (arrData.monitorCalibrationRecordPo.length > 0) {
            this.monitorCalibrationRecordPo =arrData.monitorCalibrationRecordPo;
          }
          if (arrData.waterDriftCalibrationPo.length > 0) {
            this.watercailbration = arrData.waterDriftCalibrationPo[0]; //水质校准
            this.watercailbration.calibrationTime = moment(
              parseInt(this.watercailbration.calibrationTime)
            ).format("YYYY/MM/DD");
            var dateTime = this.watercailbration.calibrationTime;
            var timeArr = dateTime.toString().split("/");
            this.yue = timeArr[1];
            this.ri = timeArr[2];
            this.water = arrData.waterDriftCalibrationPo[0].waterDriftCalibrationMonitorPo;
            this.water.forEach((item) => {
              this.waters = item.overall;
              this.waters.forEach((shu) => {
                this.waterx = shu.overall;
              });
            });
          }
          if (arrData.driftCalibrationPo.length > 0) {
            this.calobrationone = arrData.driftCalibrationPo[0];
            this.calobrationone.calibrationTime = moment(
              parseInt(this.calobrationone.calibrationTime)
            ).format("YYYY/MM/DD");
            this.calobrationone.calibrationTimeEnd = moment(
              parseInt(this.calobrationone.calibrationTimeEnd)
            ).format("YYYY/MM/DD");
            this.calobration =
              arrData.driftCalibrationPo[0].driftCalibrationMonitorPo; //烟气校准
            this.calobration.forEach((item) => {});
          }
          if (arrData.equipmentOperationMaintenancePo.length > 0) {
            this.Inspectio = arrData.equipmentOperationMaintenancePo[0];
            this.Inspectio.serviceTime = moment(
              parseInt(this.Inspectio.serviceTime)
            ).format("YYYY/MM/DD");
            let Inspection =
              arrData.equipmentOperationMaintenancePo[0].inspectionReportPo; //日常巡检
            let arr = new Map();
            Inspection.forEach((v) => {
              v.overall.forEach((item) => {
                arr.set(item.fieldId, item.situation);
              });
            });
            this.$api.findMDictionaryInfo({ id: equipmentId }).then((res) => {
              res.data.data.forEach((v) => {
                v.overall.forEach((item) => {
                  if (arr.has(item.id)) {
                    item.situation = arr.get(item.id);
                  }
                });
              });
              this.calobrationa = res.data.data;
            });
          }

          this.visibleA = true;
        }
      });
    },
    //取消按钮
    cancelBtn() {
      this.visibleA = false;
    },
  },
  mounted() {
    this.getdata();
  },
};
</script>
<style scoped src="../../../../assets/style/warning.css"></style>
<style scoped lang="scss">
.img {
  width: 150px;
  height: 100px;
  padding: 20px;
}
.border-img1 {
  border-right: 1px solid #e8e8e8;
  text-align: center;
}
.border-img {
  border-left: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  line-height: 160px;
  height: 160px;
}
.shuju {
  border: 1px solid #e8e8e8;
  font-size: 14px;
  height: 60px;
  text-align: right;
  line-height: 60px;
}
.border-class {
  height: auto;
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}
.border-class1 {
  height: auto;
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}
.border-1 {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
}
.monitorCalibrationRecordPoover {
  height: 500px !important;
  overflow-y: scroll;
}
::-webkit-scrollbar {
  /*隐藏滚轮*/
  display: none;
}
.monitorCalibrationRecordPo {
  font-size: 18px;
  text-align: center;
  color: #9fb043;
}
.listcentent {
  font-size: 16px;
  text-align: center;
  color: #bebebe;
  line-height: 30px;
  height: 30px;
}
.listcontent {
  font-size: 16px;
  text-align: center;
  color: #bebebe;
}
.faultlist {
  padding-top: 20px !important;
  border-top: 1px dashed #bebebe;
  font-size: 19px;
  color: #37ddc0;
  font-weight: bold;
}
.ischange {
  color: #37ddc0 !important;
}
.changetags {
  color: #6f8a86;
  margin-top: 50px;
  margin-right: 40px;
  font-size: 17px;
  text-align: center;
}
.tags {
  height: 100%;
  li {
    line-height: 40px;
    margin: 0 15px;
    cursor: pointer;
  }
}
.tableall {
  width: 85%;
}
.scroll-bar {
  height: 500px;
  overflow-y: auto;
}

::v-deep .ant-descriptions-title {
  color: #37ddc0;
  font-size: 24px;
}
//::v-deep#salvenote .ant-form-item {
//  margin-bottom: 0;
//  display: flex;
//  align-items: center;
//}
//
//::v-deep#salvenote .ant-form-item-children {
//  display: inline-block;
//  width: 100%;
//  display: flex;
//  align-items: center;
//  justify-content: space-between;
//}
#salvenote {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 1%;
  box-sizing: border-box;
}
.solve-img {
  display: flex;
  justify-content: space-evenly;
}
/* 表格样式 */
.tableclass {
  width: 100%;
  height: 86%;
}
#salvenote .solvebtn {
  margin-right: 10px;
  border: none;
  font-weight: 700;
  color: #1890ff;
}
#salvenote .ant-btn-danger {
  color: #1c2c2c;
  margin-right: 10px;
  background-color: #2c6a60;
  border: none;
  font-weight: 700;
}
::v-deep#salvenote .ant-table table {
  height: auto;
  border-radius: 0;
}
.bottompage {
  margin-top: 12px;
  float: right;
}
#salvenote ::v-deep .ant-checkbox-inner {
  border: 2px solid #2e9685;
  background-color: rgba(140, 179, 174, 0.5) !important;
}


.ant-form-item {
  color: #bebebe;
}
// 详情
::v-deep #salvenote .ant-form-item-children {
  color: rgba(255, 255, 255, 0.7);
}

.monitorCalibrationRecordPo {
  font-size: 22px;
  text-align: center;
  color: #9fb043;
}
.monitorCalibrationRecordPoList {
  font-size: 18px;
  text-align: center;
  color: #bebebe;
}
.monitorCalibrationRecordPotitle {
  font-size: 30px;
  color: #37ddc0;
}
.driftCalibrationPoList {
  font-size: 18px;
  text-align: center;
  color: #bebebe;
}
::v-deep .ant-modal-body {
  width: 80%;
  margin: 0 auto;
}

::v-deep .ant-tabs-bar {
  margin-bottom: 0 !important;
}
::v-deep .scroll-bar {
  border-left: 1px solid #3cbda6;
  border-right: 1px solid #3cbda6;
  border-bottom: 1px solid #3cbda6;
}


::v-deep .ant-modal-content {
  height: 700px !important;
  overflow-y: scroll;
}
::v-deep .ant-modal-content::-webkit-scrollbar {
  /*隐藏滚轮*/
  width: 0 !important;
}
.table-all {
  width: 100%;
}
.borderallq {
  border-bottom: 1px solid #3cbda6;
  border-right: 1px solid #3cbda6;
  height: 140px;
}
.borderall {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 14px;
  height: 28px;
  text-align: center;
  line-height: 28px;
}
.borderallone {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 28px;
  text-align: center;
  line-height: 28px;
}
.borderalltwo {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 14px;
  height: 56px;
  text-align: center;
  line-height: 56px;
}
.borderalltwos {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 56px;
  text-align: center;
  line-height: 56px;
}
.borderallthree {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 56px;
  text-align: center;
  line-height: 56px;
}
.borderallfour {
  border-bottom: 1px solid #3cbda6;
  border-right: 1px solid #3cbda6;
  border-left: 1px solid #3cbda6;
  height: 30px;
}
.borderallfive {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 14px;
  height: 150px;
  text-align: center;
  line-height: 150px;
  white-space: pre-wrap;
}
.borderallsix {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 122px;
  text-align: center;
  line-height: 94px;
}
.borderallseven {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 14px;
  height: 600px;
  text-align: center;
  line-height: 600px;
}
.borderalleight {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 170px;
  text-align: center;
  line-height: 170px;
}
.borderallnine {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 150px;
  text-align: center;
  line-height: 150px;
}
.borderallten {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 14px;
  text-align: center;
}
.borderallbig {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 120px;
  text-align: center;
  line-height: 120px;
}
.borderallheight {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 14px;
  height: 196px;
  text-align: center;
  line-height: 196px;
}
.borderallheights {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 112px;
  text-align: center;
  line-height: 112px;
}
.borderallheighta {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 14px;
  height: 420px;
  text-align: center;
  line-height: 420px;
}
.borderallheightb {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 420px;
  text-align: center;
  line-height: 420px;
}
.borderallF {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 14px;
  height: 112px;
  text-align: center;
  line-height: 112px;
}
.borderallFS {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 112px;
  text-align: center;
  line-height: 112px;
}
.borderallT {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 14px;
  height: 84px;
  text-align: center;
  line-height: 84px;
}
.borderallTS {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 84px;
  text-align: center;
  line-height: 84px;
}
.borderallover {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 14px;
  height: 532px;
  text-align: center;
  line-height: 532px;
}
.borderallFF {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 140px;
  text-align: center;
  line-height: 140px;
}
.borderallS {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  font-size: 14px;
  height: 196px;
  text-align: center;
  line-height: 196px;
}
.bordertop {
  border-bottom: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  font-size: 22px;
  height: 45px;
  text-align: center;
  line-height: 45px;
}

.enterpriseName{
  border: 1px solid #e8e8e8;
  border-bottom: 0;
  font-size: 14px;
  line-height: 2.5;
}
.cent{
  text-align: center;
}
.col5{
  width: 20%;
  box-sizing: border-box;
}

.s>.borderall{
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.listitem{
  display: flex;
  >.cent{
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
::v-deep .ant-calendar-range-picker-separator{
  color: rgba(255,255,255,0.6);
  vertical-align: sub;
}
::v-deep .ant-calendar-picker-clear{
  background: none;
}
</style>
